package com.springboot.study.tests.designpattern.adapter2;

import org.springframework.stereotype.Component;

/**
 * @Author: guodong
 * @Date: 2021/4/27 19:23
 * @Version: 1.0
 * @Description:
 */
@Component
public abstract class AbstractOprtatror<C,U,D> implements IOperatorService<C,U,D> {

    public abstract String createConvert(C c);

    public abstract String updateConvert(U u);

    public abstract String deleteConvert(D d);


    @Override
    public boolean create(C c) {
        String s = createConvert(c);
        System.out.println(s);
        return false;
    }

    @Override
    public boolean update(U u) {
        String s = updateConvert(u);
        System.out.println(s);
        return false;
    }

    @Override
    public boolean delete(D d) {
        String s = deleteConvert(d);
        System.out.println(s);
        return false;
    }



}
